home *** CD-ROM | disk | FTP | other *** search
/ Champak 54 / Vol 54.iso / games / x_valin.swf / scripts / DefineSprite_86 / frame_2 / DoAction.as
Encoding:
Text File  |  2007-10-01  |  916 b   |  48 lines

  1. t++;
  2. if(0 < t and (t == frac or dx == 0 and dy == 0))
  3. {
  4.    call("keys");
  5.    tellTarget("anim")
  6.    {
  7.       gotoAndStop(eval("..:direx"));
  8.    }
  9.    if(!_root.map.hitTest(_X + dx * frac,_Y + dy * frac,true))
  10.    {
  11.       dx = 0;
  12.       dy = 0;
  13.    }
  14.    call("plataformas");
  15.    t = 0;
  16. }
  17. _X = _X + dx;
  18. _Y = _Y + dy;
  19. z = int(_Y);
  20. swapdepths(z);
  21. if(eval("..:tiempo") != "GO!")
  22. {
  23.    ttt += 1;
  24.    if(ttt == 20)
  25.    {
  26.       set("..:tiempo",eval("..:tiempo") - 1);
  27.       ttt = 0;
  28.    }
  29.    if(eval("..:tiempo") == 0)
  30.    {
  31.       tellTarget(_root)
  32.       {
  33.          removeMovieClip("felipe");
  34.          removeMovieClip("goal");
  35.          removeMovieClip("pen");
  36.          n = 1;
  37.          while(eval("_root:maxvicentes") >= n)
  38.          {
  39.             removeMovieClip("v" add n);
  40.             n++;
  41.          }
  42.          gotoAndStop("over");
  43.          play();
  44.       }
  45.       removeMovieClip("");
  46.    }
  47. }
  48.